import java.util.Comparator;


public class ComparateurSolde implements Comparator<Client> {

	@Override
	public int compare(Client c1, Client c2){
		double soldeC1 = c1.getCompteCourant().getSolde() + c1.getCompteEpargne().getSolde();
		double soldeC2 = c2.getCompteCourant().getSolde() + c2.getCompteEpargne().getSolde();
		return (int)soldeC1 - (int)soldeC2;
	}

}
